import type TableColumn from "@/components/table/type/TableColumn.ts";
import type FormItem from "@/components/form/type/FormItem.ts";

/**
 * 查询条件表单结构数据
 */
export const searchSchema: FormItem[] = [
    {row: 0, span: 4, label: "角色编码", key: "roleCode", type: "input"},
    {row: 0, span: 4, label: "角色名称", key: "roleName", type: "input"},
    {
        row: 0, span: 4, label: "角色类型", key: "roleType", type: "select", options: [
            {label: "系统角色", value: 1},
            {label: "部门角色", value: 2}
        ]
    },

    {row: 0, span: 4, label: "操作", key: "operate", type: "slot"},
]

/**
 * 表格结构数据
 */
export const tableColumns: TableColumn[] = [
    {key: "id", title: "序号", width: 80, align: "center", type: "index"},
    {key: "roleName", title: "角色名称", align: "center", type: "string"},
    {key: "roleCode", title: "角色编码", align: "center", type: "string"},
    {key: "roleType", title: "角色类型", width: 150, align: "center", type: "slot"},
    {key: "roleDepartCode", title: "角色部门", align: "center", type: "string"},

    {key: "operate", title: "操作", width: 200, type: "slot", align: "center"},
]

/**
 * dialog结构数据
 */
export const dialogScheme: FormItem[] = [
    {row: 0, span: 12, label: "角色编码", key: "roleCode", placeholder: "角色编码", type: "input"},
    {row: 0, span: 12, label: "角色名称", key: "roleName", placeholder: "角色名称", type: "input"},
    {row: 1, span: 12, label: "角色部门", key: "roleDepartCode", placeholder: "角色部门", type: "input"},
    {
        row: 1, span: 12, label: "角色类型", key: "roleType", type: "select", options: [
            {label: "系统角色", value: 1},
            {label: "部门角色", value: 2},
        ]
    },
]